//
//  fwdjViewController.m
//  tongxiangOASystem
//
//  Created by michael on 17/3/24.
//  Copyright © 2017年 czd. All rights reserved.
//
#import "dengjiTableViewController.h"
#import "fwdjViewController.h"
#import "FSWaitReceiveController.h"

@interface fwdjViewController ()
@property (nonatomic,strong)NSArray* array;

@end

@implementation fwdjViewController

- (void)viewDidLoad {
    [super viewDidLoad];
        // Do any additional setup after loading the view.
          _array = [NSArray arrayWithObjects:@"待收文件",@"已收文件",@"收文登记薄",nil];
          self.title = @"发文管理";
self.view.backgroundColor = [UIColor whiteColor];
//      _array = [NSArray arrayWithObjects:@"已发文件","发文登记薄",nil];
     self.navigationController.navigationBar.tintColor = [UIColor whiteColor];
   UIBarButtonItem *barButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"返回" style:UIBarButtonItemStyleDone target:nil action:nil];
    self.navigationItem.backBarButtonItem = barButtonItem;
         [self initview];

}
- (void)initview{
UIButton *button1 = [UIButton buttonWithType:UIButtonTypeCustom];
UIButton *button2 = [UIButton buttonWithType:UIButtonTypeCustom];
UIButton *button3 = [UIButton buttonWithType:UIButtonTypeCustom];

[button1 setBackgroundImage:[UIImage imageNamed:@"已发文件-ios"] forState:UIControlStateNormal];

[button2 setBackgroundImage:[UIImage imageNamed:@"已发文件-ios"] forState:UIControlStateNormal];

[button3 setBackgroundImage:[UIImage imageNamed:@"发文登记簿-ios"] forState:UIControlStateNormal];

float width = kScreenWidth-120;
button1.frame = CGRectMake(30, 200, width/3, 200);
button2.frame = CGRectMake(60, 200, width, 100);
button3.frame = CGRectMake(60, button2.bottom+10, width, 100);
//if ([self.string integerValue] !=0) {
//
// UILabel  *label= [[UILabel alloc]initWithFrame:CGRectMake(button3.width-15,0, 15, 15)];
//    label.backgroundColor = [UIColor redColor];
//    label.layer.cornerRadius = 7;
//    label.layer.masksToBounds = YES;
//    label.textAlignment = NSTextAlignmentCenter;
////    label.font = [UIFont boldSystemFontOfSize:2.0];
//    label.textColor = [UIColor whiteColor];
//    label.text = _string;
//    [button3 addSubview:label];
//    
//UIFont *font = [UIFont boldSystemFontOfSize:(10)];
//label.font = font;
//if ([self.string integerValue] !=0) {
//            label.hidden = NO;
//        }else{
//         label.hidden = YES;
//        }
//   
//}
[button1 addTarget:self action:@selector(action1) forControlEvents:UIControlEventTouchUpInside];
[button2 addTarget:self action:@selector(action2) forControlEvents:UIControlEventTouchUpInside];
[button3 addTarget:self action:@selector(action3) forControlEvents:UIControlEventTouchUpInside];



//[self.view addSubview:button1];
[self.view addSubview:button2];
[self.view addSubview:button3];
}

- (void)action1{
UIStoryboard * storyBoard = [UIStoryboard storyboardWithName:@"Main" bundle:nil];

 FSWaitReceiveController * dueInVC = (FSWaitReceiveController*)[storyBoard instantiateViewControllerWithIdentifier:@"WaitReceive"];
 dueInVC.hidesBottomBarWhenPushed= YES;
    dueInVC.vcType = SenderSinType;
        [self.navigationController pushViewController:dueInVC animated:YES];
NSLog(@"11");

}
- (void)action2{
NSLog(@"22");
UIStoryboard * storyBoard = [UIStoryboard storyboardWithName:@"Main" bundle:nil];

FSWaitReceiveController * dueInVC = (FSWaitReceiveController*)[storyBoard instantiateViewControllerWithIdentifier:@"WaitReceive"];
 dueInVC.hidesBottomBarWhenPushed= YES;
    dueInVC.vcType = SenderSinType;
        [self.navigationController pushViewController:dueInVC animated:YES];
}
- (void)action3{
dengjiTableViewController *VC= [[dengjiTableViewController alloc]init];
VC.method = @"regbookPage";
 VC.hidesBottomBarWhenPushed= YES;

[self.navigationController pushViewController:VC animated:YES];
NSLog(@"33");
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
